He was thrashing around like a fish out of water, trying to find a solution.
Он бился как рыба об лёд, пытаясь найти решение.
Definitions
To move about wildly, uncontrollably, or in a panicked manner, often due to discomfort, confusion, or distress—similar to how a fish behaves when it is removed from water.